'''编写一个程序，对给定字符串中出现的a-z字母频率进行分析，忽略大写小写，降序方式输出'''
word = input('请输入一个字符串：')
word = word.lower()
word_dict = {}
for i in word:
    if i.isalpha():
        if i in word_dict:
            word_dict[i] += 1
        else:
            word_dict[i] = 1
word_dict = sorted(word_dict.items(), key=lambda x: x[1], reverse=True)
for i in word_dict:
    print(i[0], i[1])
